// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsICategoryManager.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    /// nsICategoryManager
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("3275b2cd-af6d-429a-80d7-f0c5120342ac")]
	public interface nsICategoryManager
	{
		
		/// <summary>
        /// Get the value for the given category's entry.
        /// @param aCategory The name of the category ("protocol")
        /// @param aEntry The entry you're looking for ("http")
        /// @return The value.
        /// </summary>
		[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Gecko.CustomMarshalers.StringMarshaler")]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		string GetCategoryEntry([MarshalAs(UnmanagedType.LPStr)] string aCategory, [MarshalAs(UnmanagedType.LPStr)] string aEntry);
		
		/// <summary>
        /// Add an entry to a category.
        /// @param aCategory The name of the category ("protocol")
        /// @param aEntry The entry to be added ("http")
        /// @param aValue The value for the entry ("moz.httprulez.1")
        /// @param aPersist Should this data persist between invocations?
        /// @param aReplace Should we replace an existing entry?
        /// @return Previous entry, if any
        /// </summary>
		[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalType = "Gecko.CustomMarshalers.StringMarshaler")]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		string AddCategoryEntry([MarshalAs(UnmanagedType.LPStr)] string aCategory, [MarshalAs(UnmanagedType.LPStr)] string aEntry, [MarshalAs(UnmanagedType.LPStr)] string aValue, [MarshalAs(UnmanagedType.U1)] bool aPersist, [MarshalAs(UnmanagedType.U1)] bool aReplace);
		
		/// <summary>
        /// Delete an entry from the category.
        /// @param aCategory The name of the category ("protocol")
        /// @param aEntry The entry to be added ("http")
        /// @param aPersist Delete persistent data from registry, if present?
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void DeleteCategoryEntry([MarshalAs(UnmanagedType.LPStr)] string aCategory, [MarshalAs(UnmanagedType.LPStr)] string aEntry, [MarshalAs(UnmanagedType.U1)] bool aPersist);
		
		/// <summary>
        /// Delete a category and all entries.
        /// @param aCategory The category to be deleted.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void DeleteCategory([MarshalAs(UnmanagedType.LPStr)] string aCategory);
		
		/// <summary>
        /// Enumerate the entries in a category.
        /// @param aCategory The category to be enumerated.
        /// @return a simple enumerator, each result QIs to
        /// nsISupportsCString.
        /// </summary>
		[return: MarshalAs(UnmanagedType.Interface)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		nsISimpleEnumerator EnumerateCategory([MarshalAs(UnmanagedType.LPStr)] string aCategory);
		
		/// <summary>
        /// Enumerate all existing categories
        /// @param aCategory The category to be enumerated.
        /// @return a simple enumerator, each result QIs to
        /// nsISupportsCString.
        /// </summary>
		[return: MarshalAs(UnmanagedType.Interface)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		nsISimpleEnumerator EnumerateCategories();
	}
}
